<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>主页</title>
</head>
<body>
<div id="divhead" style="width:100%;">
<table style="width:100%;">
<tr>
<td><a href="#">
<img src="images/logo.jpg" width="200" height="60" border="0" />
</a>
</td>
<td style="text-align:right;">
<img src="" width="26" height="23" style="margin-bottom:-4px" />&nbsp;
<a href="register.jsp">注册</a>
<% if (session.getAttribute("userBean") == null) { %>
| <a href="login.jsp">登录</a>
<% } else { %>
| 欢迎您: ${userBean.name}
| <a href="${pageContext.servletContext.contextPath}/LogoutServlet">退出</a>
<% } %>
&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>
</div>
<div id="main" style="width:100%;">
<hr/>
这里是主页内容
</div>
</body>
</html>